//
//  GameListBaseViewController.h
//  YoucApp
//
//  Created by Liam on 11/12/12.
//
//

#import <UIKit/UIKit.h>
#import "ListManager.h"

@interface GameListBaseViewController : UIViewController <UITableViewDelegate, UITableViewDataSource>
{
}

@property (retain, nonatomic) IBOutlet UITableView *tableView;

@property (retain, nonatomic) NSArray *gameList;                    // 游戏列表

- (void)constructCurrentShowList;
- (void)loadFirstList;
//- (void)clearList;
- (id)itemAtIndexPath:(NSIndexPath *)indexPath;
- (NSArray *)deleteItemAtIndexPath:(NSIndexPath *)indexPath;
- (void)createRefreshHeader;
- (void)createRefreshFooter;
- (void)enableRefreshHeader:(BOOL)enable;
- (void)enableRefreshFooter:(BOOL)enable;

#pragma mark can override

- (NSArray *)getShowList;

- (NSString *)gameListNotificationName;

- (NSArray *)getAssociateItems:(id)item;

- (void)getGameListDidFinished:(NSArray *)list error:(NSError *)error;

- (BOOL)loadList:(NSInteger)start limit:(NSInteger)limit;

- (NSString *)getCellIdentifierByItem:(id)item;
- (void)updateCell:(UITableViewCell *)cell withItem:(id)item;
- (void)didSelectCell:(UITableViewCell *)cell withItem:(id)item;

@end
